<?php

namespace App\Http\Models;

use Illuminate\Database\Eloquent\Model;

/**
 * App\Http\Models\TicketType
 *
 * @property int $id 机票种类
 * @property int|null $on_flight_id 执飞航班ID
 * @property int|null $cabin_id 舱位ID
 * @property float|null $basic_price 基本销售价格
 * @property float|null $discount 折扣
 * @property int|null $ticket_count 总数
 * @property int|null $remaining_tickets 余量
 * @property float|null $luggage_limit 行李件数
 * @property string|null $rules 改退签规则
 * @method static \Illuminate\Database\Eloquent\Builder|TicketType newModelQuery()
 * @method static \Illuminate\Database\Eloquent\Builder|TicketType newQuery()
 * @method static \Illuminate\Database\Eloquent\Builder|TicketType query()
 * @method static \Illuminate\Database\Eloquent\Builder|TicketType whereBasicPrice($value)
 * @method static \Illuminate\Database\Eloquent\Builder|TicketType whereCabinId($value)
 * @method static \Illuminate\Database\Eloquent\Builder|TicketType whereDiscount($value)
 * @method static \Illuminate\Database\Eloquent\Builder|TicketType whereId($value)
 * @method static \Illuminate\Database\Eloquent\Builder|TicketType whereLuggageLimit($value)
 * @method static \Illuminate\Database\Eloquent\Builder|TicketType whereOnFlightId($value)
 * @method static \Illuminate\Database\Eloquent\Builder|TicketType whereRemainingTickets($value)
 * @method static \Illuminate\Database\Eloquent\Builder|TicketType whereRules($value)
 * @method static \Illuminate\Database\Eloquent\Builder|TicketType whereTicketCount($value)
 * @mixin \Eloquent
 */
class TicketType extends Model
{
    //
	public $timestamps = false;
	protected $fillable = ['id', 'on_flight_id', 'cabin_id', 'basic_price', 'discount', 'ticket_count',
		'remaining_tickets', 'luggage_limit', 'rules'];
	public function cabins() {
		return $this->hasOne(Cabin::class, 'id', 'cabin_id');
	}
}
